import { getRequest, postBodyRequest, patchBodyRequest, deleteRequest } from '../../utils/http'
// import axios from 'axios'

// 按组织或名称查询全部电子围栏信息
export const getFence = function (param) {
  return getRequest('/cmd/fence', param)
}

// 获取所属单位组织树信息
export const getTree = function (param) {
  return getRequest('/organization/institutional', param)
}

// 新增电子围栏
export const addFence = function (param) {
  return postBodyRequest('/cmd/fence', param)
}

// 修改电子围栏
export const changeFence = function (param) {
  return patchBodyRequest('/cmd/fence', param)
}

// 删除电子围栏
export const deleteFence = function (ids) {
  return deleteRequest(`/cmd/fence/${ids}`)
}
